#ifndef __EEPROM_H__
#define __EEPROM_H__

#include <stdint.h>
#include <stdbool.h>

//EEPROM address
#define EEP_RemainTry	(0x2000 + 0)
#define EEP_PwdLen		(0x2200 + 0)
#define EEP_Pwd			(0x2200 + 1)

#define EEP_GetPage(addr) (uint8_t)((addr) >> 8)

bool EEP_Erase(uint8_t page);
bool EEP_Program(uint16_t addr, uint8_t dat);
uint8_t EEP_Read(uint16_t addr);

#endif
